<!DOCTYPE html>
<html lang="zh-cn"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>DEMO</title>
</head>
<body>

<script src="https://res.weiunity.com/wm/wm.js"></script>

<script type="text/javascript">
if(typeof(msg) == 'undefined'){
	wm.load.synchronizesLoadJs('https://res.weiunity.com/msg/msg.js');
}
if(typeof(kefu) == 'undefined'){
	wm.load.synchronizesLoadJs('https://res.weiunity.com/kefu/kefu.js');
}
wm.load.css('https://res.weiunity.com/kefu/css/style.css');

 
//手机界面模式
kefu.mode='mobile';

msg.loading('加载中');
wm.post('/kefu/chat/config/getNetConfig.json',{},function(data){
	msg.close();
	
	if(data.result != '1'){
		msg.failure(data.info);
	}else {
		//成功
		kefu.api.domain = data.api;
		kefu.socket.url = data.socket;
		
		//kefu.js 初始化
		kefu.init();
		
		//kefu.ui.chat.entry("kefuchatid_16d870ad4310470e9424d877121b413c");
		kefu.ui.chat.entry("9752d379cbe641039de8c68974319bb9");
	}
});

</script>

</body>
</html>